feat: implement the public metadata issuance protocol#56
Conversation
thibmeu
left a comment
There was a problem hiding this comment.
two main comments:
- there should be cross implementation test, with typescript/go. Typescript provides a JSON that has been generated by the go implementation, might be the simplest to consume
- I'm not sure the interface is the right one. I feel that there are way to extend method solely based on the type without introducing
TokenProtocolstructure
|
I've addressed most of the review comments, and now I'm looking to see how to best address the compatibility requirements between the older and newer versions of |
|
I've decided to drop the backwards compatibility handling and conform strictly to |
|
Also, RFC 9577 §2.2.2 says the token field might be a quoted-string, so I'm implementing changes accordingly. |
thibmeu
left a comment
There was a problem hiding this comment.
a few more comments. the PR is starting to look better. some questions that remains unanswered:
- should we implement edtension/challenge negotiation. this is only partial atm
- generic batch is ok to be excluded. needs a clear documentation
- i feel that having a method for origin/issuer to validate the unknown metadata (given there will only be a few standardsied and the logic may be complex) seems important, or clearly documented and explain how to validate manually
…(challenge extension parameter)
thibmeu
left a comment
There was a problem hiding this comment.
only one comment left about required extensions. overall good for me. thanks for the back and forth @karx1
@raphaelrobert remains authoritative for a review, approval, and eventual merge though
* Add Privacy Pass expiration extension helper Register the Expiration extension type and add typed encoding/decoding helpers for draft-ietf-privacypass-expiration-extension-00. This keeps token formats and redemption policy unchanged; callers still decide how to choose and enforce timestamps. Also move tests off 0x0001 as a dummy extension type and cover the draft example. * Rename expiration error variants
See crossbeam-rs/crossbeam#1276 for more info
This PR implements the issuance protocol for Publicly Verifiable tokens with Public Metadata (token type
0xDA7A).This is a revival of #25, rebased onto the current
mainbranch and updated to support draft-ietf-privacypass-public-metadata-issuance-03. This PR also addresses the feedback from that PR.This PR also pins
voprfto version0.6.0-pre.0, as cargo automatically updating to0.6.0-pre.1was causing compilation errors on a clean build with noCargo.lock.Finally, the functions
verify_tokenandparse_authorization_str/parse_authorization_str_extare some QoL additions that helped during development, but I'm happy to remove those if needed.